package com.ft.core.runtime.session;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @copyright (C), 2015-2019, XXX有限公司
 * @fileName: AuthUser
 * @author: 李阳
 * @date: 2019/6/30 22:16
 * @description: 授权用户信息
 * @history: <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
@Data
public class AuthUser implements IAuthUser, Serializable {
    private static final long serialVersionUID = 7537238429748172182L;

    /**
     * 用户Id
     */
    @ApiModelProperty(value = "用户Id")
    private Long id;

    /**
     * 租户Id
     */
    @ApiModelProperty(value = "租户Id")
    private Long tenantId;

    /**
     * 公司Id
     */
    @ApiModelProperty(value = "公司Id")
    private Long companyId;

    /**
     * 部门Id
     */
    @ApiModelProperty(value = "部门Id")
    private Long deptId;

    /**
     * 用户类型
     */
    @ApiModelProperty(value = "用户类型")
    private Integer userType;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    private String userName;
    /**
     * 密码
     */
    @JsonIgnore
    @ApiModelProperty(value = "密码", hidden = true)
    private String password;

    /**
     * 权限标记集合
     */
    @ApiModelProperty(value = "权限标记集合")
    private String[] permissions;

    /**
     * 角色集合
     */
    @ApiModelProperty(value = "角色集合")
    private String[] roles;

    /**
     * 账户是否未过期
     */
    @ApiModelProperty(value = "账户是否未过期")
    private boolean accountNonExpired = true;
    /**
     * 账户是否未锁定
     */
    @ApiModelProperty(value = "账户是否未锁定")
    private boolean accountNonLocked = true;
    /**
     * 凭据是否未过期
     */
    @ApiModelProperty(value = "凭据是否未过期")
    private boolean credentialsNonExpired = true;
    /**
     * 是否启用该用户
     */
    @ApiModelProperty(value = "是否启用该用户")
    private boolean enabled = true;
}
